<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<script type="text/javascript" src="<%=request.getContextPath() %>/resources/js/common/echarts.js"></script>
</head>
<body>
	 	<br><br>
 		<div id="report" style="height:700px;"></div>
 		
<script type="text/javascript">
 	$(function(){
 		//初始化echarts实例
 		 var myChart = echarts.init(document.getElementById('report'));
         $.ajax({
         	url:'/oderreport',
         	type:'get',
         	success:function(data){
 		        		// 指定图表的配置项和数据
 		        var option = {
 				    title: {
 				        text: '最近一个月订单数',
 				        textStyle:{
 				        	fontSize:24
 				        }
 				    },
 				    tooltip: {
 				        trigger: 'axis'
 				    },
 				    textStyle:{
 				    	fontSize:22
 				    },
 				    grid: {
 				    	left: '1%',/*
 				        right: '9%',  
 				        bottom: '3%',*/
 				        containLabel: true,
 				        show:true
 				    },
 				    toolbox: {
 				        feature: {
 				            saveAsImage: {}
 				        }
 				    },
 				    xAxis: {
 				        type: 'category',
 				        boundaryGap: false,
 				        axisLabel:{
 				            textStyle: {
 				               fontSize: 20
 				             }
 				        }
 				    },
 				    yAxis: {
 				        type: 'value',
 				        axisLabel : {
 				             formatter: '{value}',
 				             textStyle: {
 				                 fontSize: 20
 				               }
 				          }
 				   		 }
 					};
 						//jquery 深度拷贝后台的数据与option结合，进行装配
 						$.extend(true,option,data);
 				        // 使用刚指定的配置项和数据显示图表。
 				        myChart.setOption(option);
         		},
         		erro:function(){
         			alert("报表出不来！")
         		}
         })
 	})			
</script>
</body>
</html>